\(\int \frac {\sec ^3(x)}{a-a \sin ^2(x)} \, dx\) [266]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 16, antiderivative size = 35 \[ \int \frac {\sec ^3(x)}{a-a \sin ^2(x)} \, dx=\frac {3 \text {arctanh}(\sin (x))}{8 a}+\frac {3 \sec (x) \tan (x)}{8 a}+\frac {\sec ^3(x) \tan (x)}{4 a} \]

[Out]

3/8*arctanh(sin(x))/a+3/8*sec(x)*tan(x)/a+1/4*sec(x)^3*tan(x)/a

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {3254, 3853, 3855} \[ \int \frac {\sec ^3(x)}{a-a \sin ^2(x)} \, dx=\frac {3 \text {arctanh}(\sin (x))}{8 a}+\frac {\tan (x) \sec ^3(x)}{4 a}+\frac {3 \tan (x) \sec (x)}{8 a} \]

[In]

Int[Sec[x]^3/(a - a*Sin[x]^2),x]

[Out]

(3*ArcTanh[Sin[x]])/(8*a) + (3*Sec[x]*Tan[x])/(8*a) + (Sec[x]^3*Tan[x])/(4*a)

Rule 3254

Int[(u_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Dist[a^p, Int[ActivateTrig[u*cos[e + f*x
]^(2*p)], x], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0] && IntegerQ[p]

Rule 3853

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Csc[c + d*x])^(n - 1)/(d*(n
- 1))), x] + Dist[b^2*((n - 2)/(n - 1)), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n,
 1] && IntegerQ[2*n]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps \begin{align*} \text {integral}& = \frac {\int \sec ^5(x) \, dx}{a} \\ & = \frac {\sec ^3(x) \tan (x)}{4 a}+\frac {3 \int \sec ^3(x) \, dx}{4 a} \\ & = \frac {3 \sec (x) \tan (x)}{8 a}+\frac {\sec ^3(x) \tan (x)}{4 a}+\frac {3 \int \sec (x) \, dx}{8 a} \\ & = \frac {3 \text {arctanh}(\sin (x))}{8 a}+\frac {3 \sec (x) \tan (x)}{8 a}+\frac {\sec ^3(x) \tan (x)}{4 a} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.86 \[ \int \frac {\sec ^3(x)}{a-a \sin ^2(x)} \, dx=\frac {\frac {3}{8} \text {arctanh}(\sin (x))+\frac {3}{8} \sec (x) \tan (x)+\frac {1}{4} \sec ^3(x) \tan (x)}{a} \]

[In]

Integrate[Sec[x]^3/(a - a*Sin[x]^2),x]

[Out]

((3*ArcTanh[Sin[x]])/8 + (3*Sec[x]*Tan[x])/8 + (Sec[x]^3*Tan[x])/4)/a

Maple [A] (verified)

Time = 0.68 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.23

method result size
parallelrisch \(\frac {3 \ln \left (-\cot \left (x \right )+\csc \left (x \right )+1\right )-3 \ln \left (-\cot \left (x \right )+\csc \left (x \right )-1\right )+3 \sec \left (x \right ) \tan \left (x \right )+2 \tan \left (x \right ) \left (\sec ^{3}\left (x \right )\right )}{8 a}\) \(43\)
default \(\frac {-\frac {1}{16 \left (1+\sin \left (x \right )\right )^{2}}-\frac {3}{16 \left (1+\sin \left (x \right )\right )}+\frac {3 \ln \left (1+\sin \left (x \right )\right )}{16}+\frac {1}{16 \left (\sin \left (x \right )-1\right )^{2}}-\frac {3}{16 \left (\sin \left (x \right )-1\right )}-\frac {3 \ln \left (\sin \left (x \right )-1\right )}{16}}{a}\) \(52\)
risch \(-\frac {i \left (3 \,{\mathrm e}^{7 i x}+11 \,{\mathrm e}^{5 i x}-11 \,{\mathrm e}^{3 i x}-3 \,{\mathrm e}^{i x}\right )}{4 \left ({\mathrm e}^{2 i x}+1\right )^{4} a}-\frac {3 \ln \left ({\mathrm e}^{i x}-i\right )}{8 a}+\frac {3 \ln \left ({\mathrm e}^{i x}+i\right )}{8 a}\) \(74\)
norman \(\frac {\frac {5 \tan \left (\frac {x}{2}\right )}{4 a}+\frac {3 \left (\tan ^{3}\left (\frac {x}{2}\right )\right )}{4 a}+\frac {3 \left (\tan ^{5}\left (\frac {x}{2}\right )\right )}{4 a}+\frac {5 \left (\tan ^{7}\left (\frac {x}{2}\right )\right )}{4 a}}{\left (\tan ^{2}\left (\frac {x}{2}\right )-1\right )^{4}}-\frac {3 \ln \left (\tan \left (\frac {x}{2}\right )-1\right )}{8 a}+\frac {3 \ln \left (\tan \left (\frac {x}{2}\right )+1\right )}{8 a}\) \(80\)

[In]

int(sec(x)^3/(a-a*sin(x)^2),x,method=_RETURNVERBOSE)

[Out]

1/8*(3*ln(-cot(x)+csc(x)+1)-3*ln(-cot(x)+csc(x)-1)+3*sec(x)*tan(x)+2*tan(x)*sec(x)^3)/a

Fricas [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.31 \[ \int \frac {\sec ^3(x)}{a-a \sin ^2(x)} \, dx=\frac {3 \, \cos \left (x\right )^{4} \log \left (\sin \left (x\right ) + 1\right ) - 3 \, \cos \left (x\right )^{4} \log \left (-\sin \left (x\right ) + 1\right ) + 2 \, {\left (3 \, \cos \left (x\right )^{2} + 2\right )} \sin \left (x\right )}{16 \, a \cos \left (x\right )^{4}} \]

[In]

integrate(sec(x)^3/(a-a*sin(x)^2),x, algorithm="fricas")

[Out]

1/16*(3*cos(x)^4*log(sin(x) + 1) - 3*cos(x)^4*log(-sin(x) + 1) + 2*(3*cos(x)^2 + 2)*sin(x))/(a*cos(x)^4)

Sympy [F]

\[ \int \frac {\sec ^3(x)}{a-a \sin ^2(x)} \, dx=- \frac {\int \frac {\sec ^{3}{\left (x \right )}}{\sin ^{2}{\left (x \right )} - 1}\, dx}{a} \]

[In]

integrate(sec(x)**3/(a-a*sin(x)**2),x)

[Out]

-Integral(sec(x)**3/(sin(x)**2 - 1), x)/a

Maxima [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 51, normalized size of antiderivative = 1.46 \[ \int \frac {\sec ^3(x)}{a-a \sin ^2(x)} \, dx=-\frac {3 \, \sin \left (x\right )^{3} - 5 \, \sin \left (x\right )}{8 \, {\left (a \sin \left (x\right )^{4} - 2 \, a \sin \left (x\right )^{2} + a\right )}} + \frac {3 \, \log \left (\sin \left (x\right ) + 1\right )}{16 \, a} - \frac {3 \, \log \left (\sin \left (x\right ) - 1\right )}{16 \, a} \]

[In]

integrate(sec(x)^3/(a-a*sin(x)^2),x, algorithm="maxima")

[Out]

-1/8*(3*sin(x)^3 - 5*sin(x))/(a*sin(x)^4 - 2*a*sin(x)^2 + a) + 3/16*log(sin(x) + 1)/a - 3/16*log(sin(x) - 1)/a

Giac [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.34 \[ \int \frac {\sec ^3(x)}{a-a \sin ^2(x)} \, dx=\frac {3 \, \log \left (\sin \left (x\right ) + 1\right )}{16 \, a} - \frac {3 \, \log \left (-\sin \left (x\right ) + 1\right )}{16 \, a} - \frac {3 \, \sin \left (x\right )^{3} - 5 \, \sin \left (x\right )}{8 \, {\left (\sin \left (x\right )^{2} - 1\right )}^{2} a} \]

[In]

integrate(sec(x)^3/(a-a*sin(x)^2),x, algorithm="giac")

[Out]

3/16*log(sin(x) + 1)/a - 3/16*log(-sin(x) + 1)/a - 1/8*(3*sin(x)^3 - 5*sin(x))/((sin(x)^2 - 1)^2*a)

Mupad [B] (verification not implemented)

Time = 13.60 (sec) , antiderivative size = 31, normalized size of antiderivative = 0.89 \[ \int \frac {\sec ^3(x)}{a-a \sin ^2(x)} \, dx=\frac {3\,\mathrm {atanh}\left (\sin \left (x\right )\right )}{8\,a}+\frac {3\,\sin \left (x\right )}{8\,a\,{\cos \left (x\right )}^2}+\frac {\sin \left (x\right )}{4\,a\,{\cos \left (x\right )}^4} \]

[In]

int(1/(cos(x)^3*(a - a*sin(x)^2)),x)

[Out]

(3*atanh(sin(x)))/(8*a) + (3*sin(x))/(8*a*cos(x)^2) + sin(x)/(4*a*cos(x)^4)